package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 
 *
 * @author code-generate
 * @date 2022-01-07
 */
@Data
@DbTable(tableName = "t_alarm")
public class Alarm extends BaseEntity {
        /**
     * 预警编号
     */
    @DbTableField(columnName = "c_alarm_code", dbType = DbTypeEnum.VARCHAR)
    public String alarmCode ;

    /**
     * 0 预警 1 报警
     */
    @DbTableField(columnName = "c_type", dbType = DbTypeEnum.TINYINT)
    public Byte type ;

    /**
     * 预警内容
     */
    @DbTableField(columnName = "c_alarm_content", dbType = DbTypeEnum.VARCHAR)
    public String alarmContent ;

    /**
     * 预警对象类型  数据字典
     */
    @DbTableField(columnName = "c_obj_type", dbType = DbTypeEnum.VARCHAR)
    public String objType ;

    /**
     * 预警对象Id 
     */
    @DbTableField(columnName = "c_obj_id", dbType = DbTypeEnum.VARCHAR)
    public String objId ;

    /**
     * 预警对象名称
     */
    @DbTableField(columnName = "c_obj_name", dbType = DbTypeEnum.VARCHAR)
    public String objName ;

    /**
     * 预警时间 
     */
    @DbTableField(columnName = "c_alarm_date", dbType = DbTypeEnum.DATE)
    public LocalDate alarmDate ;

    /**
     * 预留状态位 
     */
    @DbTableField(columnName = "c_state", dbType = DbTypeEnum.INTEGER)
    public Integer state ;

    /**
     * 备注
     */
    @DbTableField(columnName = "c_remark", dbType = DbTypeEnum.VARCHAR)
    public String remark ;

    /**
     * 修改人
     */
    @DbTableField(columnName = "c_db_update_id", dbType = DbTypeEnum.VARCHAR)
    public String dbUpdateId ;

    /**
     * 修改时间 
     */
    @DbTableField(columnName = "c_db_update_date", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime dbUpdateDate ;

    /**
     * 坐标X
     */
    @DbTableField(columnName = "c_lng", dbType = DbTypeEnum.DOUBLE)
    public Double lng ;

    /**
     * 坐标Y
     */
    @DbTableField(columnName = "c_lat", dbType = DbTypeEnum.DOUBLE)
    public Double lat ;


}
